<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta charset='utf-8' />
	<title>台账管理</title>
</head>
<body style='padding:0px;margin:0px'>
	<div style='width:1018px;height:682px;background:url(../public/before_login.jpg) no-repeat;position:relative'>
		<div style='width:300px;height:200px;position:absolute;top:250px;left:450px'>
			<div><span style='color:#ddd;font-weight:bold'>工　号：</span><input type="text"  style='width:150px' id='account' /></div>

			<br />
			
			<div><span style='color:#ddd;font-weight:bold'>密　码：</span><input type="password" style='width:150px' id='pwd' /></div>

			<br />

			<div style='padding-left:66px'>
				<button id='login'>登陆</button>
				<button onclick='location.href="register.html"'>工号激活</button>
			</div>

		</div>
	</div>
</body>
</html>
<script src='../public/jquery1.1.js'></script>
<script src='../public/fun.js'></script>
<script>
exit(1);

$(function(){
	$('#login').click(function(){
		var account = m_trim($('#account').val());
		var pwd = m_trim($('#pwd').val());

		if(!account || !pwd){
			A('用户名或密码不得为空！');return;
		}
		var data = {
				type:'login',
				account:account,
				pwd:pwd
		};

		Ajax(data,function(res){
			var tmp = _checkJsonFormat(res); //检测JSON格式
			if(tmp.stat == 'ok'){
				if(tmp.data.stat == 2){
					sessionStorage.ledgerAccount = tmp.data.account;
					sessionStorage.ledgerName = tmp.data.name;
					location.replace('main.html');
				}else{
					if(tmp.data.stat == 1){
						A('用户审核中，请联系管理员！');
					}else{
						A('用户已封禁，请联系管理员！');
					}
				}
			}else{
				A('用户名或密码不正确！');				
			}
		});
	
	});
});	
</script>

